﻿using Application.Users.Commands.CreateUser;
using Application.Users.Commands.UpdateUser;
using Application.Users.Models;
using Domain.Entities;

namespace Application.Users.Interfaces
{
    public interface IUserWriteRepository
    {
        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="phoneNumber"></param>
        /// <param name="passwordHash"></param>
        /// <param name="ct"></param>
        /// <returns></returns>
        Task<Guid> AddAsync(User Item, CancellationToken ct = default);

        /// <summary>
        /// 增量更新用户信息
        /// </summary>
        /// <param name="userDTO"></param>
        /// <param name="ct"></param>
        /// <returns></returns>
        Task<Guid> UpdateAsync(UpdateUserModel userItem, CancellationToken ct = default);

        /// <summary>
        /// 删除用户数据
        /// </summary>
        /// <param name="userItem"></param>
        /// <param name="ct"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(Guid userId, CancellationToken ct = default);
    }
}
